<template>
	<div>
		<el-card>
			<el-select v-model="editReporValue" placeholder="请选择" class="mg20" @change="reportItem">
				<el-option v-for="item in editReportlist" :key="item.value" :label="item.label" :value="item">
				</el-option>
			</el-select>
			<el-button type="success" class="mL20" @click="addReport">添加宣传信息</el-button>
		</el-card>
		<!-- 弹窗 -->
		<el-dialog title="提示" :visible.sync="dialogVisible">
			<el-form :model="reportForm">
				<el-form-item label="宣传信息标题" :label-width="formLabelWidth">
					<el-input v-model="reportForm.label" autocomplete="off"></el-input>
				</el-form-item>
				<el-form-item label="宣传信息内容" :label-width="formLabelWidth">
					<editor :id='proReportid' ref="proReport" :editdata="reportinfo"></editor>
					<div v-html="reportinfo"></div>
				</el-form-item>
			</el-form>
			<span slot="footer" class="dialog-footer">
				<el-button @click="dialogVisible = false">取 消</el-button>
				<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
			</span>
		</el-dialog>

	</div>
</template>

<script>
	// import api from "@/api"
	import editor from "@/components/Editor.vue"
	export default {
		components: {
			editor
		},
		data() {
			return {
				editReporValue: '',
				editReportlist: [],
				dialogVisible:false,
				reportForm:{
					label:'',
					value:''
				},
				reportinfo:'',
				formLabelWidth:'200px'
			}
		},
		methods: {

		},
		created() {
			console.log(this.$route.params.id)
		}
	}
</script>

<style>
</style>
